﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyCompanyName.AbpZeroTemplate
{
    public class MolService
    {

        public static Mp.Eln.Remoting.Service.IMolService ServiceClient
        {
            get
            {
                string RemoteServerUrl = System.Configuration.ConfigurationManager.AppSettings["RemotingEln.RemoteServerUrl"];
                Mp.Eln.Remoting.Service.IFactory _builder =
                     (Mp.Eln.Remoting.Service.IFactory)Activator.GetObject(typeof(Mp.Eln.Remoting.Service.IFactory),
                     RemoteServerUrl);

                try
                {
                    return _builder.CreateMolInstance();
                }
                catch
                {

                    return null;
                }


            }
        }

    }
}
